This invention relates to the rotation of image data of a source rectangle area of a document. Particularly, the invention relates to the rotation of the image data of the source rectangle area by 90 degrees or 270 degrees wherein the rotated image data is stored into a destination rectangle area in an image storage means which is partitioned by boundary lines separated from each other by K bits, with the K bits between the boundary lines being handled as a group of bits, such as a byte or a word during read/write operations of the image storage means.
Many efforts have been developed which rotate image data stored in a memory area by an angle of 90 degrees, 180 degrees or 270 degrees and store the rotated image data in a separate memory area. In traditional image rotation processes, image data to be rotated was rotated in bit by bit process. That is, the first bit of the image data in a source memory area was fetched and stored in a destination memory area to perform the desired image rotation. Next, the second bit was fetched and stored in the destination memory area, and so on. This bit by bit process required a long processing time.
To improve the processing time, an approach disclosed in the Japanese published unexamined patent application Ser. No. 57-130144 was suggested in which the original image data stored in an image data memory is fetched on a word by word basis and the fetched words are stored in a rotation memory. The word consists of N bits, and the rotation memory stores M words. The image data stored in the image data memory, i.e. source memory area is stored in the rotation memory on the word by word basis, and the stored image data is read from the rotation memory in a direction determined by a rotation angle +90 degrees or -90 degrees.
U.S. Pat. No. 4084195, assigned to the assignee of the present invention, discloses an image rotation system for a dot printer wherein image data of a document is stored in a page buffer from which plural pel lines of the image data are stored in a horizontal stripe buffer which has data lines equal to the number of ink jet nozzles of the printer and is partitioned into plural byte columns. An alternate byte included in the byte column is rotated by a 90 degree rotation means and is stored in one of vertical stripe buffers.
These schemes are effective in the case that the read/write operations of the image data memory and a memory area, into which the rotated image data from the rotation memory is stored, are performed on a bit by bit basis, wherein the addresses of the rotated image data of the M bits are freely assigned in the memory area. However, if both the image data memory and the memory area have byte boundaries or the word boundaries wherein the read/write operations are performed on a byte by byte basis or a word by word basis the problem shown in FIG. 2 is encountered.
In FIG. 2, it is assumed that an image 13 is rotated by 90 degrees and stored in an area 16 of a memory area 11, and a memory area 11 has byte boundaries 14. To perform the rotation of the image 13, one byte 12 of the image 13 must be stored into a byte position 15 of the area 16. In this case, the one byte position 15 does not align with the byte boundaries 14, and hence two write cycles 17 are required to store the one byte. Shift operations and a store operation of the remaining bits for each byte are required, resulting in time consuming complicated operations.